package com.yztstudy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 图片的实体类
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "product_picture")
public class Picture implements Serializable {

    public static final Long serialVersionUID = 1L;

    // 成员变量
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id; // 主键

    @TableField(value = "product_id")
    @JsonProperty("product_id")
    private Integer productId; // 商品主键

    @TableField(value = "product_picture")
    @JsonProperty("product_picture")
    private String productPicture; // 图片地址

    @TableField(value = "intro")
    @JsonProperty("intro")
    private String intro; // 描述
}
